/*
 * rwLock.h
 *
 *  Created on: 2017年6月15日
 *      Author: orange
 */

#ifndef RWLOCK_H_
#define RWLOCK_H_
#include <pthread.h>

class rwLock {
public:
	virtual ~rwLock();

	bool readLock();
	bool writeLock();
	bool tryReadLock();
	bool tryWriteLock();
	bool unLock();

	pthread_rwlock_t rwlock = PTHREAD_RWLOCK_INITIALIZER;
};

#endif /* RWLOCK_H_ */
